import Vue from 'vue'
import Vuex from 'vuex'
import cart from './cart'
import order from './order'
import contact from './contact'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    cart,
    order,
    contact
  },
  plugins: [
    createPersistedState()
  ]
  /* plugins: [
    createPersistedState({
      storage: window.localStorage,
      reducer: (state) => {
        return {
          cart: state.cart
        }
      }
    })
  ] */
})
